package com.mq.server.controller;

import com.mq.server.config.Producer;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <h3>partitionjob</h3>
 * <p>rabbitmqController</p>
 * RabbitMqController
 * @author : hduong
 * @version : 1.0
 * @date : 2019-12-19 10:39
 **/
@RestController
@RequestMapping("/mq")
public class RabbitMQController {
    private static final String SUCCESS = "SUCCESS";
    private static final String FAILURE = "FAILURE";

    @Autowired
    private Producer producer;

    @GetMapping("/push")
    public String pushMsg() {
        producer.send();
        return SUCCESS;
    }
}
